import { axios } from '@/utils/request'

/**
 * 首页代办和已办流程
 * @param data
 * @returns {AxiosPromise}
 */
export function getInfos(id) {
    return axios({
        url: '/vatoutinv/vmsEnterpriseInfo/getInfo?id='+id,
        headers: { 'content-type': 'application/x-www-form-urlencoded' },
        method: 'get',
    })
}

export function addInfos() {
    return axios({
        url: '/vatoutinv/vmsEnterpriseInfo/addInfo',
        method: 'get',
    })
}

export function queryVmsAvalibleTaxRateLogDetail(data) {
    let obj = {
        url: '/vatoutinv/vmsAvalibleTaxRate/queryVmsAvalibleTaxRateLogDetail',
        method: 'post',
    }
    if (data) {
        obj.data = data
    }
    return axios(obj)
}

export function getDetail(params) {
    return axios({
        url: '/vatoutinv/vmsEnterpriseInfo/getDetail',
        method: 'get',
        params,
    })
}

export function getBaseDetailPage(params) {
    return axios({
        url: '/vatoutinv/vmsClassifyCode/getBaseDetailPage',
        method: 'get',
        params,
    })
}

export function vmsEnterpriseInfoPage(data) {
    let obj = {
        url: '/vatoutinv/vmsEnterpriseInfo/page',
        method: 'post',
    }
    if (data) {
        obj.data = data
    }
    return axios(obj)
}

export function getBasePage(data) {
    let obj = {
        url: '/vatoutinv/vmsClassifyCode/getBasePage',
        method: 'post',
    }
    if (data) {
        obj.data = data
    }
    return axios(obj)
}

export function queryVmsAvalibleTaxRateLog(data) {
    let obj = {
        url: '/vatoutinv/vmsAvalibleTaxRate/queryVmsAvalibleTaxRateLog',
        method: 'post',
    }
    if (data) {
        obj.data = data
    }
    return axios(obj)
}
